package com.dc.project_kotlin.vm

import androidx.lifecycle.MutableLiveData
import com.dc.base.network.NetworkApi
import com.dc.base.vm.BaseViewModel
import com.dc.project_kotlin.api.ApiService
import com.dc.project_kotlin.bean.BannerResponse

class HomeViewModel : BaseViewModel() {

    var pageNo = 0

    val bannerLiveData = MutableLiveData<ArrayList<BannerResponse>>()

    fun getBannerData() {
        val service = NetworkApi.createService(ApiService::class.java, ApiService.SERVER_URL)
        request({
            service.getBanner()
        }, {
            bannerLiveData.value = it
        }, {

        })

    }
}